#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
void main()
{
	pid_t pid;
	printf("I will fork process in 3seconds\n");
	sleep(3);
	int m,n;
	pid = fork();
	if(pid == 0)
	{
		for(n=0;n<5;n++)
		{
			printf("This is the child process , my pid = %d\n", getpid());
			sleep(1);
		}
	}else if(pid > 0){
		for(m=0;m<5;m++)
		{
			printf("This is the parent process , my pid = %d\n", getpid());
			sleep(1);
		}
	}else{
		printf("Error in forking process\n");
	}
	printf("End of program\n");
	exit(0);

	return;
}
